﻿Imports System.Runtime.Serialization

<Serializable()>
Public Class RawIssue
    Implements ISerializable

#Region "Serialization"
    Private Sub New(info As SerializationInfo, context As StreamingContext)
        Dim version As Integer = info.GetInt32("version")

        If version >= 1 Then
            Text = info.GetString("text")
            Severity = CType(info.GetInt32("severity"), IssueSeverity)
        End If
    End Sub


    Public Sub GetObjectData(info As SerializationInfo, context As StreamingContext) Implements ISerializable.GetObjectData
        info.AddValue("version", 1)

        'Version 1 data
        info.AddValue("text", Text)
        info.AddValue("severity", Severity)
    End Sub
#End Region

    Public Property Text As String
    Public Property Severity As IssueSeverity

    Public Sub New()

    End Sub
End Class
